/**
 * @author wpp
 * 
 * @requires jQuery,EasyUI
 * 
 * 为datagrid增加表头菜单，用于显示或隐藏列，注意：冻结列不在此菜单中
 */
var createGridHeaderContextMenu = function(e, field) {
	e.preventDefault();
	var grid = $(this);/* grid本身 */
	var screen_wpp = $('#screen_wpp')
	if (!screen_wpp.length) {
		var screen_wpp = $('<div  id="screen_wpp"></div>').appendTo('body');
		var button1 = $('<button>按钮1</button>').appendTo(screen_wpp);
		var button2 = $('<button>按钮2</button>').appendTo(screen_wpp);
		button1.click(function(item){
			screen_wpp.css('display','none');
			grid.datagrid('load',{page:1,name:'2'});
		})
		button2.click(function(item){
			screen_wpp.css('display','none');
			grid.datagrid('load',{page:1,age:'18'});
		})
	}
	
	var fildOption = grid.datagrid('getColumnOption', field);
	if(fildOption.editor && fildOption.editor.screen){
		screen_wpp.css({'display':'block',left : e.pageX,top : e.pageY})
	}
};
$.fn.datagrid.defaults.onHeaderContextMenu = createGridHeaderContextMenu;